module.exports = {
    createAdminRules: {
        username: [
            { type: 'string', required: true, message: '请输入用户名' },
            { pattern: /^[a-zA-Z0-9_]{2,20}$/, message: '用户名必须是2到20个字符，包含字母、数字和下划线', },
        ],
        password: { type: 'string', required: true, message: '请输入密码' },
        email: { type: 'email', pattern: /^[A-Za-z0-9/._]+@+[A-Za-z0-9*-]+[/.A-Za-z0-9]*$/, message: '请输入正确格式的邮箱' },
    },
    updateAdminRules: {
        username: { type: 'string', required: true, message: '请输入用户名' },
        id: { required: true, message: '请输入用户id' },
    },
    updateMyProfileRules: {
        username: { type: 'string', required: true, message: '请输入用户名' },
    },
    updateMyPasswordRules: {
        oldPassword: { type: 'string', required: true, message: '请输入用户名' },
        newPassword: { type: 'string', required: true, message: '请输入用户名' },
    },
    deleteAdminRules: {
        id: { required: true, message: '请输入用户id' },
    },
    loginAdminRules: {
        identifier: { type: 'string', required: true, message: '请输入用户名/邮箱' },
        password: { type: 'string', required: true, message: '请输入密码' },
    }
}